package com.zvz.client.wsdl.hello;
import java.net.URL;
/**
 * Created by lilipo on 2017/5/4.
 */
public class Client {

    public static void main(String[] args) throws Exception {

        URL wsdlUrl = new URL("http://localhost:8983/services/hello?wsdl");
        HelloWSService helloWSS = new HelloWSService(wsdlUrl);
        HelloWS helloWS = helloWSS.getHelloWSPort();

        Integer x = 3;
        Integer y = 5;
        Integer add = helloWS.add(x, y);
        System.out.println("add");
        System.out.println("3 + 5 = " + add);
        System.out.println("");

        String name = "小明";
        String password = "19";
        User user = helloWS.getPerson(name, password);
        System.out.println("getPerson");
        System.out.println("name = " + user.getUsername() + " age = " + user.getPassword());
        System.out.println("");
    }
}
